package com.shqcjd.sinopecdemomobile.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.shqcjd.sinopecdemomobile.R;

public class SaveDraftDialog extends Dialog {
    private Context context;
    private Button  btn_dialog_finish;
    private TextView  tv_dialog_save_content;


    public SaveDraftDialog(@NonNull Context context) {
        super(context);
        this.context = context;
    }

    public SaveDraftDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
    }

    protected SaveDraftDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_savedraft_dialog);
        getWindow().setBackgroundDrawableResource(R.color.transparent);
        btn_dialog_finish = findViewById(R.id.btn_dialog_finish);
        tv_dialog_save_content = findViewById(R.id.tv_dialog_save_content);

        btn_dialog_finish.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });
    }

    public void setViewText(String content){
        tv_dialog_save_content.setText(content);
    }

}
